﻿using System.Collections.Generic;
using UnityEngine;
using Zenject;

public class PlayerBase : MonoBehaviour
{
    [Inject] private GameManager _gameManager;
    [Inject] private DiContainer _container;
    [SerializeField] private List<GameObject> weaponPoints;

    public void Init()
    {
        GameObject weapon = _container.InstantiatePrefab(
            Resources.Load<GameObject>(_gameManager.currentWeaponsBaseData[0].prefab), weaponPoints[0].transform);
        weapon.GetComponent<WeaponBase>().Init(_gameManager.currentWeaponsBaseData[0]);
    }
}